terminate function if 

	abs(a-b) < 0.000001
or

	abs((fa-fb)/max(fa,fb)) < 0.01		fast mode

